home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine CD 1995
/
Archive Magazine CD 1995.iso
/
text
/
hints
/
volume_07
/
issue_12
< prev
Wrap
Text File
|
1995-02-16
|
22KB
|
454 lines
Hints and tips (from Multimedia Column)
7.12
• Genesis Professional − One reader wrote to complain that he was
getting repeated crashes when trying to replicate frames. I must admit,
I was unaware of the problem, so I went back and tested it out. The gist
of it is this: if you open a blank page and pull out a frame and then
replicate it, the program crashes. Now when you first pull out a frame,
by default it is a WORD frame, and if you try and replicate it the crash
occurs as Genesis will not allow you to replicate this type of frame.
The cure is simple, just convert the WORD frame into a TEXT frame by
clicking in the frame itself, then you can copy it as many times as you
like.
7.12
• Magpie − Some months ago, I issued a challenge to Magpie users about
making a scrolling binder with continuous music. I got no replies to
this challenge, but my solution was a bit of a cheat. Using my CD-ROM, I
set up an audio CD running and then loaded in the Magpie scrolling demo
which had no sound effects! I’m sure there is a better solution so I
will keep the prizes until someone comes up with a better one!
7.12
Hints and Tips
7.12
• Boot structure on the Risc PC − How many of you have got to grips
with the Boot application on the Risc PC? It’s a little bit messy on
first glance − and even on second and all subsequent glances! However,
it is also very powerful and practical. The following is brief guide to
its contents and what they are used for and goes a little beyond the
discussion in chapter 11 of the User Guide.
7.12
As many of you have discovered, the !Boot application simply runs the
configure utility, enabling you to select various hardware and desktop
options. It has also done an awful lot of work by the time you get to
the desktop, setting up system variables, configuring your preferences
and booting and running several applications, modules and obey files.
Those of you with stronger stomachs may have shift-double-clicked on it
and will have been faced with a bewildering array of nested directories
and files, many of which are named !Boot or Boot, !Configure or
Configure, and all of these are sufficiently dotted with references to
each other to ensure that all who enter are reduced to quivering
technophobes.
7.12
Please note that if you are going to make changes to the insides of
!Boot, you would be wise to take a copy of it first. If you do find that
the contents of !Boot.Choices.Boot are irretrievably messy, you can run
the application !ResetBoot in $.Diversions.Tools which will restore
!Boot to its factory settings. Also, I would recommend keeping a copy of
the RISC OS applications contained in $.Apps if you intend to make any
changes to them − as you do not get a copy of them on floppy disc, as
you did with previous versions of RISC OS.
7.12
Apart from the usual application baggage of !Run, !Boot, !Sprites and
!Help, there are two directories that are of interest (Resources and
Choices) and two that aren’t (Library and Utils.)
7.12
Resources contains the applications that RISC OS needs, but which
needn’t concern the user most of the time, these being !System, !Scrap
and !Fonts. The !Configure application that gets run automatically by
!Boot is also here.
7.12
Choices contains nothing but a directory called Boot and it is here that
the interesting stuff resides.
7.12
The obey file PreDesktop gets run first and sets up aliases and system
variables. Its most interesting job is to control which applications
appear when the Apps icon on the iconbar is clicked. In the following
discussion, ‘Apps’ refers to the directory viewer opened by clicking on
the ‘Apps’ icon on the icon bar, whilst ‘$.Apps’ refers to the directory
called ‘Apps’ in the root of the hard disc. As you will see, they are
not the same.
7.12
By default the contents of $.Apps all appear in the Apps resource. The
easiest way to have one of your own applications accessible through Apps
icon is to copy it into $.Apps. Note that any applications deleted or
moved from $.Apps will no longer appear in Apps after a reset, and
cannot be retrieved. Apps only contains a ‘facade’ for the real
applications which are stored elsewhere. If you have a whole suite of
applications you would like to appear in Apps, and you don’t want them
messed up with the contents of $.Apps, you can ask PreDesktop to add
them from any other directory. Near the end of the file PreDesktop is
the line
7.12
AddApp Boot:^.Apps.!*
7.12
which will place any application in $.Apps into the Apps. If you want to
add to this a single application stored elsewhere, you can add a line
something like
7.12
AddApp Boot:^.MyApps.Impression.!Style
7.12
or to add all the applications in a given directory add a line like
7.12
AddApp Boot:^.MyApps.UsefulApps.!*
7.12
The directory PreDesk contains things which need to be run before the
desktop starts. This is intended for use by applications which need
software, modules or drivers in place prior to the desktop but you may
find you are required to place things there manually when installing
certain new hardware and software products.
7.12
The file Desktop is where the !Boot system filer_boots anything that may
be needed by the operating system, and some of the essentials for the
user. Desktop also causes any applications or obey files contained in
the directory Tasks to be run. Inside Tasks is where applications may
place files they want to be run within the desktop but before the user
gets started. It already contains !ROMPatch and a file called Configure.
If you create a Desktop Boot file from the task manager icon, this is
where it is saved (see page 139 in the User Guide). You can also store
your own goodies here. For instance, if you are using an IDE 105Mb
removable drive in your Risc PC, you may want to place the !SyQuest
Application in the Tasks directory so that it is always present on the
iconbar when you start.
7.12
There is a drawback with placing applications in Tasks that install
themselves on the icon bar. If you choose to create a desktop boot file,
you may find you get a duplicate copy of your favourite application next
time you reset the computer. The best way is to try it and see. !Syquest
doesn’t suffer from this problem.
7.12
You may have tried putting your best backdrop on the pinboard and saving
the desktop to have it appear every time you use your Risc PC, only to
find that RISC OS has decided to put one of its bland wallpapers up in
its place. This is because the ...Tasks.!Boot file containing the state
of the desktop (and therefore your pretty picture) gets run before the
file Configure (simply because the files are run alphabetically). Then
the Configure file simply pastes up the textured background choices you
make from the !Configure utility and thus overwrites your true
preference for a backdrop. You can overcome this either by running
!Configure (by double-clicking on the !Boot application), selecting
‘none’ for background texture in the ‘screen’ options and clicking on
the ‘set’ icon. You could try renaming either !Boot or Configure, so
that they swap positions, but this is not the way to do it because
changing either the desktop boot, or running !Configure, will create the
same problem again. David Webb, NCS.
7.12
• Changing ChangeFSI − It is possible to modify !ChangeFSI v0.95 to
enable non-Risc PC owners to create high/true colour sprites.
7.12
!ChangeFSI v0.95 allows Risc PC owners to create 16bpp (32,000) or 32bpp
(16,000,000) sprites, but it will not work on non-Risc PC machines − an
error message comes up if you try and create one! However, a little
modification of the !ChangeFSI Basic file gets over this problem.
7.12
Open up the !ChangeFSI application and look for a blue Basic file called
ChangeFSI. Load this file into !Edit and 21 lines down you will see a
line:
7.12
SYS “OS_SWINumberFromString”,, “OS_SpriteOp” TO spop%
7.12
insert an ‘X’ at the start of the “OS_Spriteop” word so that it reads:
7.12
SYS “OS_SWINumberFromString”,, “XOS_SpriteOp” TO spop%
7.12
and 531 lines down (you may wish to use !Edit’s F5 key short cut here!)
you will see:
7.12
SYS“Wimp_ReadPixTrans”,&100,sar%,n$,,,, ifactors%,pixtrans%
7.12
insert a ‘X’ at the start of the “Wimp_Read...” word so that it reads:
7.12
SYS“XWimp_ReadPixTrans”,&100,sar%,n$,,,, ifactors%,pixtrans%
7.12
Resave the file!
7.12
Now when you enter a 32,000 colour display mode (or set !ChangeFSI’s
output option) and drag a suitable JPEG/TIFF, etc image to !ChangeFSI,
the error will not occur, but a seemingly ‘blank’ white window will
appear. The image is really there − it just can’t be seen! Save this
‘blank’ image and you will have created your very own high-colour
sprite! Stuart Halliday, Quantum Software.
7.12
• Replacement mice − With the Acorn mouse costing £40* and both the
Clares and Watford mice costing £30, the survival of our school mice has
been of some concern to me. The oldest mice for the A310s have caused
most problems as they have weak leads and a little stretching breaks the
wires inside the cable. They also go out of adjustment causing the
pointer to stall or go off in the wrong direction. The A3000 mice have
far fewer problems but, after a lot of use, they too can have cable
breaks and one has failed electronically. So far, the A3020 type have
not failed − but perhaps they have not been in use long enough.
7.12
(*We still have a few cut-price Acorn mice at £20. Ed.)
7.12
Repairing mice myself was a time-consuming business and replacement
leads were costly too; one from Archive is £11 or £13 depending on the
mouse-type. I have used a company called CSL to repair all the A310
mice. They are reliable and quick and have a fixed charge of £15 plus
VAT, which includes a new cable. This is strong and thick and definitely
child-proof, if a bit clumsy. Meanwhile, I have kept my eyes open for a
cheap replacement. There are numerous compatible Atari and Amiga mice,
usually selling for about £10 at shows, but they only have two buttons.
Similarly, there are PC mice at a slightly higher price, but the 3-
button variety are for the serial port.
7.12
Thankfully, the latest Maplin catalogue has a cheap 3-button Amiga
mouse. A little investigation worked out the connections and then a bit
of delicate soldering to a 9-pin miniature DIN plug, also from Maplin,
produced a fully working replacement. The mouse is neat and fits well in
the hand. It has a coated steel ball and membrane switches rather than
microswitches. These could be replaced, but the feel is good anyway. A
possible bonus is that the sensitivity is about twice that of the Acorn
mouse, i.e. it moves twice as far on screen for a given movement across
the mat.
7.12
For anyone who needs a replacement, I can recommend this route if you
are a competent solderer with a fine iron. The connections and parts are
shown below. Although the wire colours in my mouse were in a convenient
resistor-code order, you should confirm this before soldering.
7.12
Parts from Maplin Electronics:
7.12
RT51F − Amiga Mouse − £10.95
7.12
JX19V − Min DIN Line Plug 9W − 98p.
7.12
(Prices are inc VAT.)
7.12
Mouse plug connections
7.12
Pin Function Colour
7.12
9 menu white
7.12
8 adjust grey
7.12
7 select black
7.12
6 yb blue
7.12
5 ya green
7.12
4 xa yellow
7.12
3 xb orange
7.12
2 +5v red
7.12
1 0v brown
7.12
Keyboard socket (or rear of plug)
7.12
Steve Drain, Portland.
7.12
(If you have never soldered a mini-DIN plug before, be warned − it is a
VERY fiddly job! Ed.)
7.12
CSL’s address is: 15 Spencer Road, New Milton, Hants, BH25 6BZ.
7.12
• Resetting the palette on the Risc PC − One of our subscribers happily
ran one of the alternative palette files, such as those given for
Artworks and Impression, only to realise that on RISC OS 3.5 there is no
palette icon with which to alter it, or, more importantly, to reset to
default. We’ve not been able to find any easy way to reset the palette
other than to take a default palette from a pre-RISC OS 3.5 computer and
double-click on it on the Risc PC. This does the job so, for those of
you who do not have the luxury of another machine, a default palette is
included on the program disc. David Webb, NCS
7.12
• RISC OS 3 Laser Direct driver problems − If you look at last month’s
Archive carefully, you will see a small printing problem with the new
RISC OS 3 LD drivers from CC. Take page 50 for example and look at line
8 which starts, “Star to average”. As you will probably be able to see,
there is a distortion of the text which looks like a missing line or
lines of dots on the printout. Having once identified it, you will
probably be able to see it on many of the pages of the magazine at about
the same position!!!!
7.12
CC know about the problem and say that they are looking into it. There
is, however, a temporary solution. To stop it, you have to switch off
the half-toning of text. To do this, shift-click on the !Printers icon
on the iconbar and set the options as shown opposite to “Graphics only”.
7.12
The only slight snag with this is that it reveals another (even worse)
bug. If, with half-toning on graphics only, you print something
sideways, it goes completely AWOL and prints the text at the wrong
spacing and in totally the wrong place! Ed.
7.12
(Stop Press − CC say that they have a beta-release of version 2.65 which
they are going to send me. It seems to have fixed the problems but, of
course, you can never be sure until it is thoroughly tested. Ed.)
7.12
• Selecting modes in Basic on the Risc PC − We recently had an enquiry
regarding the effects of the MODE command in Basic on the Risc PC.
Unlike previous machines, the mode can be set using a mode definition
string rather than just a number. The idea is that this gives access to
the whole range of modes available to the Risc PC. If the specific
machine on which the software is running does not support the mode
requested, the closest mode which is available will be selected.
7.12
The mode description string takes the form “Xn Ym Ck” where n is the
desired X resolution, m is the desired Y resolution, and k sets the
number of colours – 2, 4, 16, 256, 32K, 16M are all valid colour
specifiers. For example MODE “X800 Y600 C16” will choose a mode similar
to mode 31 on earlier machines. Note also that the resolutions given in
the string are the required resolutions in Pixels, not logical units as
used by the Basic MOVE/DRAW/PLOT commands for example. More on this
later.
7.12
The mode can be specified either by number or by string. Most of the old
modes are supported, and with some calculation, the new modes are also
accessible by number. The easiest way to find the number is to enter the
mode using the mode string, and then “PRINT MODE” which will display the
current mode number.
7.12
Unfortunately, for users who have worked their way up from earlier
machines, the new system has some strange effects. The new method makes
more sense than the old system which was based on the BBC Micro system
of TTL rgb colours, but you do need to be aware of the changes. When a
mode is chosen by number and the mode has 2, 4 or 16 colours, then the
palette is redefined to be the same as that offered on the BBC,
including, for 16 colour modes, the flashing colours. This is identical
to the operation of earlier RISC OS machines.
7.12
If the mode string is used, however, there are some differences.
Firstly, using the string has the same result as a “*wimpmode” command
being issued rather than a “*mode”. The effect is that (a) the desktop
mode will have changed, and (b) the palette will be redefined to match
the desktop palette for that number of colours, including clearing the
screen to a mid-grey background, and selecting black text on a white
background. Secondly, the computer gets to choose what it thinks is the
best mode for the job. As noted above, MODE “X800 Y600 C16” gives you
the same size and colours as mode 31, however the two are not identical.
MODE 31 specifies a particular mode whereas the string specifies general
requirements for the mode. In this case, where mode 31 has a refresh
rate of 56Hz, the mode string selects a mode which has a refresh rate of
75Hz, considerably reducing the flicker. The important point here is
that, by passing a string, the choice of mode is more independent,
allowing the computer to choose the mode it can support that is closest
to the mode requested.
7.12
If you need to use a limited number of colours, the best method to use
is the mode string, followed by a redefinition of the palette if needed,
using VDU 19,n,16,r,g,b. Individual colours can be chosen as normal
using GCOL a,c. The more “official” method, especially for high colour
modes is to use the mode string and the SWI ColourTrans_SetG-COL since
that will choose the closest colour in the palette defined. (For best
results, you may still wish to change the palette in low colour modes
for particular tasks). An example is shown below in procedural form
which you may find useful. The procedure will work on earlier machines
as well.
7.12
REM PROCsetcolour
7.12
REM r%, g%, b% set the amounts of red green
7.12
REM and blue for the desired colour,
7.12
REM Colourtrans will be used to pick
7.12
REM the closest colour and set it.
7.12
REM effect% is a standard GCOL effect field
7.12
REM Use SWI number for speed :
7.12
REM ColourTrans_SetGCOL = &40743
7.12
:
7.12
DEF PROCsetcolour(r%,g%,b%,effect%)
7.12
LOCAL colour%
7.12
colour%=(b%<<24)+(g%<<16)+(r%<<8)
7.12
SYS &40743,colour%,,,0,effect%
7.12
ENDPROC
7.12
Finally, let me deal with the OS and pixel units conversions mentioned
earlier. Unlike PCs where locations of pixels tend to be addressed
directly, Acorn has always had a level of indirection - the “logical
resolution”. This had two main advantages in the past, firstly that the
logical resolution did not change with mode, so a line across the middle
of the screen would still appear in the middle even if you changed the
number of pixels on the screen. Secondly, the display worked in the same
way as a mathematical graph, with the origin at the bottom left corner
of the screen, y increasing upwards. If absolute pixels are used, the
top left is the origin, and y decreases downwards.
7.12
The first of these two advantages no longer holds. Because of the
dramatic increase in resolutions and the need to fit more onto the
screen mean, the logical resolutions for different modes are no longer
identical. Consider the table on page 525 of the Risc PC User Guide:
Mode 12 is 640×256 pixels but has a logical resolution of 1280×1024.
Incidentally, this was the standard logical resolution for all modes on
the BBC and earlier Archimedes. Mode 27 at 640×480 only has a logical
resolution of 1280×960 i.e. although mode 27 is “higher resolution”, you
actually get less of a page on the screen than you do in mode 12! (You
will have to take my word for the logical resolutions − they have been
taken out of the Risc PC manual, but appeared in earlier versions if you
have access to those – page 221 of the joint User & Applications guide
for RISC OS 3.)
7.12
This has been used to good effect on the Risc PC, allowing large area
desktops such as the X1600 Y600 mode which has four times the area of
the X800 Y600, but only double the number of pixels.
7.12
This means that you do not know what the logical resolution of a mode is
when you choose it, so to make your software as mode independent as
possible, you need to check the actual and logical resolutions using the
SWI OS_ReadModeVariables and set up appropriate scaling factors. If you
do not have the PRMs, you can assume that for rectangular pixel modes
2*X converts a pixel to the correct logical position, and 4*Y gives the
appropriate scaling for the vertical. In square pixel modes, use 2*X and
2*Y for the scaling. If the actual Y resolution is less than half of the
actual X resolution then it is probably safe to assume a rectangular
pixel mode, otherwise assume square pixel.
7.12
On the monthly program disc is a program called “setcolour” which
includes the above procedure. As a demonstration, the program goes
through 2, 4, 16, 256, 32K and 16M colours and displays a slice from the
colour cube. (You may find the program fails to display the higher depth
modes if you do not have any VRAM). Simply double click on it, once it
has finished the first colour square, press a key to move on to the next
higher colour depth. You may need to reset your desktop mode after it
has finished. SetColourN is similar but only uses 2, 4, 16 and 256
colours referenced by number to demonstrate the difference between
desktop and default “BBC” palettes. This version will also work on pre-
Risc PC machines. Matthew Hunter, NCS.
7.12
• Sound Boots? − For those of you seeking to boost the sound output of
your computer, may I suggest you take a quick trip to your local branch
of Boots the Chemist. In the music department, you should find a pair of
Boots’ own brand ZX200CD microspeakers for a mere £14.99. These come in
rather a naff cardboard box, but do have a volume control on the front
of each speaker plus a PBS button which enhances the bass sound. They
require four LR6 batteries (about another £3) but as they have auto
power switch off, these last a fair time. The supplied lead plugs
directly into the headphone socket on an Acorn computer.
7.12
The difference is stunning and, certainly in a noisy classroom, they
would be a great help. Even in the home environment, they can make a lot
of difference. Paul Hooper, Martham, Norfolk.
7.12
• Thumbnail creation − Quantum Software have provided Archive
subscribers with a copy of Executor (the playback-only version of
Keystroke). It has been supplied as seen, with no warranty, etc, for use
by Archive magazine subscribers only, to demonstrate some of the
abilities of Keystroke.
7.12
The application has the ability to produce, from a directory of JPEG or
TIFF files, a multi-sprite file − in effect, making a !Paint ‘thumbnail’
file.
7.12
These thumbnail sprite files are very useful for displaying your bit-map
images quickly and, whilst it isn’t as good as a professional thumbnail
application, they cost money. Because Paint and this copy of Executor
come free, this is an definite advantage! Stuart Halliday, Quantum
Software.
7.12
N.B. Quantum are also offering Keystroke at a special price of £19 to
Archive subscribers for a limited period. For details, see page 5. A
7.12